package learn.emp01.ex03;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()){
            String input = sc.nextLine();
            int sum = 0;
            for (char c : input.toCharArray()){
                if (Character.isDigit(c)){
                    sum += Character.getNumericValue(c);
                }
            }
            System.out.println(sum);
        }
    }
}
